package com.zhehekeji.opsys.api.webservice.server;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.zhehekeji.opsys.api.resp.DateReportButtonLogListResp;
import com.zhehekeji.opsys.api.resp.DateReportListResp;
import com.zhehekeji.opsys.api.resp.DateReportOrderLogListResp;
import com.zhehekeji.opsys.api.resp.DateReportResp;
import com.zhehekeji.opsys.api.resp.DateReportSearchHisListResp;
import com.zhehekeji.opsys.api.resp.DateReportVodTimeListResp;

/**
 * @author chenweiliu chenwei.liu@163.com
 * @ClassName DataReport
 * @Description TODO
 * @date 2015-3-26   上午10:58:57
 */
@Path(value = "/")
@WebService
public interface DataReport {

    /**
     * @param userID          用户账号
     * @param stb             用户盒子型号
     * @param productCode     产品编码
     * @param productName     产品名称
     * @param cpID            cpID
     * @param type            上报对象类型
     * @param resolution      分辨率
     * @param areaID          区域编码
     * @param epgPlatformType EPG基础平台类型
     * @Title: addVisitLog
     * @Description: 新增产品访问日志
     */
    @GET
    @Path(value = "addVisitLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddVisitLog", operationName = "addVisitLog")
    DateReportResp addVisitLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                               @WebParam(name = "stb") @QueryParam(value = "stb") String stb,
                               @WebParam(name = "productCode") @QueryParam(value = "productCode") String productCode,
                               @WebParam(name = "productName") @QueryParam(value = "productName") String productName,
                               @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                               @WebParam(name = "type") @QueryParam(value = "type") int type,
                               @WebParam(name = "resolution") @QueryParam(value = "resolution") int resolution,
                               @WebParam(name = "areaID") @QueryParam(value = "areaID") String areaID,
                               @WebParam(name = "epgPlatformType") @QueryParam(value = "epgPlatformType") int epgPlatformType);

    @GET
    @Path(value = "addPageLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddPageLog", operationName = "addPageLog")
    DateReportResp addPageLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                              @WebParam(name = "stb") @QueryParam(value = "stb") String stb,
                              @WebParam(name = "platformType") @QueryParam(value = "platformType") int platformType,
                              @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                              @WebParam(name = "type") @QueryParam(value = "type") int type,
                              @WebParam(name = "pageIdentity") @QueryParam(value = "pageIdentity") String pageIdentity,
                              @WebParam(name = "pageName") @QueryParam(value = "pageName") String pageName,
                              @WebParam(name = "provinceIdentity") @QueryParam(value = "provinceIdentity") String provinceIdentity,
                              @WebParam(name = "provinceName") @QueryParam(value = "provinceName") String provinceName,
                              @WebParam(name = "parentPageIdentity") @QueryParam(value = "parentPageIdentity") String parentPageIdentity,
                              @WebParam(name = "contentCode") @QueryParam(value = "contentCode") String contentCode,
                              @WebParam(name = "contentName") @QueryParam(value = "contentName") String contentName,
                              @WebParam(name = "categoryCode") @QueryParam(value = "categoryCode") String categoryCode,
                              @WebParam(name = "categoryName") @QueryParam(value = "categoryName") String categoryName,
                              @WebParam(name = "operatorIdentity") @QueryParam(value = "operatorIdentity") String operatorIdentity, 
                              @WebParam(name = "operatorName") @QueryParam(value = "operatorName") String operatorName, 
                              @WebParam(name = "parentPageName") @QueryParam(value = "parentPageName") String parentPageName, 
                              @WebParam(name = "utype") @QueryParam(value = "utype") String utype, 
                              @WebParam(name = "otype") @QueryParam(value = "otype") String otype, 
                              @WebParam(name = "originRecommend") @QueryParam(value = "originRecommend") String originRecommend, 
                              @WebParam(name = "ptype") @QueryParam(value = "ptype") String ptype,
                              @WebParam(name = "resolution") @QueryParam(value = "resolution") String resolution);

    @GET
    @Path(value = "addButtonLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddButtonLog", operationName = "addButtonLog")
    DateReportResp addButtonLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                                @WebParam(name = "stb") @QueryParam(value = "stb") String stb,
                                @WebParam(name = "platformType") @QueryParam(value = "platformType") int platformType,
                                @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                                @WebParam(name = "type") @QueryParam(value = "type") int type,
                                @WebParam(name = "pageIdentity") @QueryParam(value = "pageIdentity") String pageIdentity,
                                @WebParam(name = "pageName") @QueryParam(value = "pageName") String pageName,
                                @WebParam(name = "buttonIdentify") @QueryParam(value = "buttonIdentify") String buttonIdentify,
                                @WebParam(name = "buttonName") @QueryParam(value = "buttonName") String buttonName,
                                @WebParam(name = "provinceIdentity") @QueryParam(value = "provinceIdentity") String provinceIdentity,
                                @WebParam(name = "provinceName") @QueryParam(value = "provinceName") String provinceName,
                                @WebParam(name = "parentPageIdentity") @QueryParam(value = "parentPageIdentity") String parentPageIdentity,
                                @WebParam(name = "contentCode") @QueryParam(value = "contentCode") String contentCode,
                                @WebParam(name = "contentName") @QueryParam(value = "contentName") String contentName,
                                @WebParam(name = "categoryCode") @QueryParam(value = "categoryCode") String categoryCode,
                                @WebParam(name = "categoryName") @QueryParam(value = "categoryName") String categoryName,
                                @WebParam(name = "operatorIdentity") @QueryParam(value = "operatorIdentity") String operatorIdentity, 
                                @WebParam(name = "operatorName") @QueryParam(value = "operatorName") String operatorName, 
                                @WebParam(name = "parentPageName") @QueryParam(value = "parentPageName") String parentPageName, 
                                @WebParam(name = "utype") @QueryParam(value = "utype") String utype, 
                                @WebParam(name = "otype") @QueryParam(value = "otype") String otype, 
                                @WebParam(name = "originRecommend") @QueryParam(value = "originRecommend") String originRecommend, 
                                @WebParam(name = "ptype") @QueryParam(value = "ptype") String ptype,
                                @WebParam(name = "resolution") @QueryParam(value = "resolution") String resolution);

    /**
     * @param userID          用户账号
     * @param contentCode     内容编码
     * @param contentName     内容名称
     * @param cpID            cp编码
     * @param productCode     产品编码
     * @param type            0：电影  1：连续剧
     * @param seriesCode      连续剧编码
     * @param seriesName      连续剧名称
     * @param productName     产品名称
     * @param category        上报对象类型
     * @param resolution      分辨率
     * @param areaID          区域编码
     * @param epgPlatformType EPG基础平台类型
     * @param stb             机顶盒型号
     * @Title: addVodLog
     * @Description: 上报影片访问记录
     */
    @GET
    @Path(value = "addVodLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddVodLog", operationName = "addVodLog")
    DateReportResp addVodLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                             @WebParam(name = "contentCode") @QueryParam(value = "contentCode") String contentCode,
                             @WebParam(name = "contentName") @QueryParam(value = "contentName") String contentName,
                             @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                             @WebParam(name = "productCode") @QueryParam(value = "productCode") String productCode,
                             @WebParam(name = "type") @QueryParam(value = "type") int type,
                             @WebParam(name = "seriesCode") @QueryParam(value = "seriesCode") String seriesCode,
                             @WebParam(name = "seriesName") @QueryParam(value = "seriesName") String seriesName,
                             @WebParam(name = "productName") @QueryParam(value = "productName") String productName,
                             @WebParam(name = "category") @QueryParam(value = "category") int category,
                             @WebParam(name = "resolution") @QueryParam(value = "resolution") int resolution,
                             @WebParam(name = "areaID") @QueryParam(value = "areaID") String areaID,
                             @WebParam(name = "epgPlatformType") @QueryParam(value = "epgPlatformType") int epgPlatformType,
                             @WebParam(name = "stb") @QueryParam(value = "stb") String stb);

    /**
     * @param userID
     * @param stb
     * @param platformType
     * @param cpID
     * @param type
     * @param pageIdentity
     * @param pageName
     * @param buttonIdentify
     * @param buttonName
     * @param provinceIdentity
     * @param provinceName
     * @param parentPageIdentity
     * @param contentCode
     * @param contentName
     * @param categoryCode
     * @param categoryName
     * @param playTime
     * @return
     * @Title: addVodTimeLog
     * @Description: 上报影片访问时长
     */
    @GET
    @Path(value = "addVodTimeLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddVodTimeLog", operationName = "addVodTimeLog")
    DateReportResp addVodTimeLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                                 @WebParam(name = "stb") @QueryParam(value = "stb") String stb,
                                 @WebParam(name = "platformType") @QueryParam(value = "platformType") int platformType,
                                 @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                                 @WebParam(name = "type") @QueryParam(value = "type") int type,
                                 @WebParam(name = "pageIdentity") @QueryParam(value = "pageIdentity") String pageIdentity,
                                 @WebParam(name = "pageName") @QueryParam(value = "pageName") String pageName,
                                 @WebParam(name = "buttonIdentify") @QueryParam(value = "buttonIdentify") String buttonIdentify,
                                 @WebParam(name = "buttonName") @QueryParam(value = "buttonName") String buttonName,
                                 @WebParam(name = "provinceIdentity") @QueryParam(value = "provinceIdentity") String provinceIdentity,
                                 @WebParam(name = "provinceName") @QueryParam(value = "provinceName") String provinceName,
                                 @WebParam(name = "parentPageIdentity") @QueryParam(value = "parentPageIdentity") String parentPageIdentity,
                                 @WebParam(name = "contentCode") @QueryParam(value = "contentCode") String contentCode,
                                 @WebParam(name = "contentName") @QueryParam(value = "contentName") String contentName,
                                 @WebParam(name = "categoryCode") @QueryParam(value = "categoryCode") String categoryCode,
                                 @WebParam(name = "categoryName") @QueryParam(value = "categoryName") String categoryName,
                                 @WebParam(name = "playTime") @QueryParam(value = "playTime") Long playTime,
                                 @WebParam(name = "operatorIdentity") @QueryParam(value = "operatorIdentity") String operatorIdentity, 
                                 @WebParam(name = "operatorName") @QueryParam(value = "operatorName") String operatorName, 
                                 @WebParam(name = "utype") @QueryParam(value = "utype") String utype, 
                                 @WebParam(name = "ptype") @QueryParam(value = "ptype") String ptype,
                                 @WebParam(name = "resolution") @QueryParam(value = "resolution") String resolution);

    /**
     * @param userID
     * @param action
     * @param stb
     * @param platformType
     * @param cpID
     * @param type
     * @param pageIdentity
     * @param pageName
     * @param buttonIdentify
     * @param buttonName
     * @param provinceIdentity
     * @param provinceName
     * @param parentPageIdentity
     * @param contentCode
     * @param contentName
     * @param categoryCode
     * @param categoryName
     * @return
     * @Title: addOrderLog
     * @Description: 上报用户订购记录
     */
    @GET
    @Path(value = "addOrderLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddOrderLog", operationName = "addOrderLog")
    DateReportResp addOrderLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                               @WebParam(name = "action") @QueryParam(value = "action") int action,
                               @WebParam(name = "stb") @QueryParam(value = "stb") String stb,
                               @WebParam(name = "platformType") @QueryParam(value = "platformType") int platformType,
                               @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                               @WebParam(name = "type") @QueryParam(value = "type") int type,
                               @WebParam(name = "pageIdentity") @QueryParam(value = "pageIdentity") String pageIdentity,
                               @WebParam(name = "pageName") @QueryParam(value = "pageName") String pageName,
                               @WebParam(name = "buttonIdentify") @QueryParam(value = "buttonIdentify") String buttonIdentify,
                               @WebParam(name = "buttonName") @QueryParam(value = "buttonName") String buttonName,
                               @WebParam(name = "provinceIdentity") @QueryParam(value = "provinceIdentity") String provinceIdentity,
                               @WebParam(name = "provinceName") @QueryParam(value = "provinceName") String provinceName,
                               @WebParam(name = "parentPageIdentity") @QueryParam(value = "parentPageIdentity") String parentPageIdentity,
                               @WebParam(name = "contentCode") @QueryParam(value = "contentCode") String contentCode,
                               @WebParam(name = "contentName") @QueryParam(value = "contentName") String contentName,
                               @WebParam(name = "categoryCode") @QueryParam(value = "categoryCode") String categoryCode,
                               @WebParam(name = "categoryName") @QueryParam(value = "categoryName") String categoryName,
                               @WebParam(name = "operatorIdentity") @QueryParam(value = "operatorIdentity") String operatorIdentity, 
                               @WebParam(name = "operatorName") @QueryParam(value = "operatorName") String operatorName,
                               @WebParam(name = "ptype") @QueryParam(value = "ptype")String ptype, 
                               @WebParam(name = "resolution") @QueryParam(value = "resolution")String resolution, 
                               @WebParam(name = "comFrom") @QueryParam(value = "comFrom")String comFrom);

    /**
     * @param userID          用户账号
     * @param stb             用户盒子型号
     * @param ip              投诉IP
     * @param productCode     产品编码
     * @param productName     产品名称
     * @param cpID            cpID
     * @param type            上报对象类型
     * @param resolution      分辨率
     * @param areaID          区域编码
     * @param epgPlatformType EPG基础平台类型
     * @Title: addComplainLog
     * @Description: 上报用户投诉记录
     */
    @GET
    @Path(value = "addComplainLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddComplainLog", operationName = "addComplainLog")
    DateReportResp addComplainLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                                  @WebParam(name = "stb") @QueryParam(value = "stb") String stb,
                                  @WebParam(name = "ip") @QueryParam(value = "ip") String ip,
                                  @WebParam(name = "productCode") @QueryParam(value = "productCode") String productCode,
                                  @WebParam(name = "productName") @QueryParam(value = "productName") String productName,
                                  @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                                  @WebParam(name = "type") @QueryParam(value = "type") int type,
                                  @WebParam(name = "resolution") @QueryParam(value = "resolution") int resolution,
                                  @WebParam(name = "areaID") @QueryParam(value = "areaID") String areaID,
                                  @WebParam(name = "epgPlatformType") @QueryParam(value = "epgPlatformType") int epgPlatformType);

    /**
     * @param userID          用户账号
     * @param contentCode     内容编码
     * @param contentName     内容名称
     * @param origPrice       原价
     * @param price           现价
     * @param resolution      清晰度 0:标清,1:高清
     * @param comeFrom        0：正常 1：推荐位 2：活动
     * @param cpID            cpID
     * @param areaID          区域编码
     * @param productCode     产品编码
     * @param productName     产品名称
     * @param epgPlatformType EPG基础平台类型
     * @param stb             机顶盒型号
     * @throws
     * @Title: addPPVOrderLog
     * @Description: 上报用户PPV订购记录
     */
    @GET
    @Path(value = "addPPVOrderLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddPPVOrderLog", operationName = "addPPVOrderLog")
    DateReportResp addPPVOrderLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                                  @WebParam(name = "contentCode") @QueryParam(value = "contentCode") String contentCode,
                                  @WebParam(name = "contentName") @QueryParam(value = "contentName") String contentName,
                                  @WebParam(name = "origPrice") @QueryParam(value = "origPrice") double origPrice,
                                  @WebParam(name = "price") @QueryParam(value = "price") double price,
                                  @WebParam(name = "resolution") @QueryParam(value = "resolution") int resolution,
                                  @WebParam(name = "comeFrom") @QueryParam(value = "comeFrom") int comeFrom,
                                  @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                                  @WebParam(name = "areaID") @QueryParam(value = "areaID") String areaID,
                                  @WebParam(name = "productCode") @QueryParam(value = "productCode") String productCode,
                                  @WebParam(name = "productName") @QueryParam(value = "productName") String productName,
                                  @WebParam(name = "epgPlatformType") @QueryParam(value = "epgPlatformType") int epgPlatformType,
                                  @WebParam(name = "stb") @QueryParam(value = "stb") String stb);

    @GET
    @Path(value = "addHomepageLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddHomepageLog", operationName = "addHomepageLog")
    DateReportResp addHomepageLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID,
                                  @WebParam(name = "homepageCode") @QueryParam(value = "homepageCode") String homepageCode,
                                  @WebParam(name = "homepageName") @QueryParam(value = "homepageName") String homepageName,
                                  @WebParam(name = "location") @QueryParam(value = "location") String location,
                                  @WebParam(name = "resolution") @QueryParam(value = "resolution") int resolution,
                                  @WebParam(name = "cpID") @QueryParam(value = "cpID") String cpID,
                                  @WebParam(name = "areaID") @QueryParam(value = "areaID") String areaID,
                                  @WebParam(name = "epgPlatformType") @QueryParam(value = "epgPlatformType") int epgPlatformType,
                                  @WebParam(name = "stb") @QueryParam(value = "stb") String stb);
    
    
    @GET
    @Path(value = "getPageLogList")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doGetPageLogList", operationName = "getPageLogList")
    public DateReportListResp getPageLogList(@WebParam(name = "stb") @QueryParam(value = "stb") String stb, @WebParam(name = "userID") @QueryParam(value = "userID") String userID, @WebParam(name = "firstIndex") @QueryParam(value = "firstIndex") int firstIndex, @WebParam(name = "maxResult") @QueryParam(value = "maxResult") int maxResult);

    @GET
    @Path(value = "getButtonLogList")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doGetButtonLogList", operationName = "getButtonLogList")
    public DateReportButtonLogListResp getButtonLogList(@WebParam(name = "stb") @QueryParam(value = "stb") String stb, @WebParam(name = "userID") @QueryParam(value = "userID") String userID, @WebParam(name = "firstIndex") @QueryParam(value = "firstIndex") int firstIndex, @WebParam(name = "maxResult") @QueryParam(value = "maxResult") int maxResult);

    @GET
    @Path(value = "getVodTimeLogList")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doGetVodTimeLogList", operationName = "getVodTimeLogList")
    public DateReportVodTimeListResp getVodTimeLogList(@WebParam(name = "stb") @QueryParam(value = "stb") String stb, @WebParam(name = "userID") @QueryParam(value = "userID") String userID, @WebParam(name = "firstIndex") @QueryParam(value = "firstIndex") int firstIndex, @WebParam(name = "maxResult") @QueryParam(value = "maxResult") int maxResult);

    @GET
    @Path(value = "getOrderLogList")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doGetOrderLogList", operationName = "getOrderLogList")
    public DateReportOrderLogListResp getOrderLogList(@WebParam(name = "stb") @QueryParam(value = "stb") String stb, @WebParam(name = "userID") @QueryParam(value = "userID") String userID, @WebParam(name = "firstIndex") @QueryParam(value = "firstIndex") int firstIndex, @WebParam(name = "maxResult") @QueryParam(value = "maxResult") int maxResult);

    @GET
    @Path(value = "addSearchHisLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doAddSearchHisLog", operationName = "addSearchHisLog")
    public DateReportResp addSearchHisLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID, 
    		@WebParam(name = "key") @QueryParam(value = "key") String key, 
    		@WebParam(name = "code") @QueryParam(value = "code") String code, 
    		@WebParam(name = "name") @QueryParam(value = "name") String name, 
    		@WebParam(name = "pageNo") @QueryParam(value = "pageNo") String pageNo, 
    		@WebParam(name = "poster") @QueryParam(value = "poster") String poster, 
    		@WebParam(name = "operatorIdentity") @QueryParam(value = "operatorIdentity") String operatorIdentity, 
    		@WebParam(name = "operatorName") @QueryParam(value = "operatorName") String operatorName,
    		@WebParam(name = "resolution") @QueryParam(value = "resolution") String resolution);
	
    @GET
    @Path(value = "getSearchHisLog")
    @Produces(value = MediaType.APPLICATION_JSON)
    @WebMethod(action = "doGetSearchHisLog", operationName = "getSearchHisLog")
    public DateReportSearchHisListResp getSearchHisLog(@WebParam(name = "userID") @QueryParam(value = "userID") String userID, @WebParam(name = "maxResult") @QueryParam(value = "maxResult") int maxResult);
}
